<template>
    <div>
        <el-select v-model="value2" placeholder="请选择">
            <el-option
                v-for="item in options2"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                :disabled="item.disabled">
            </el-option>
        </el-select>
    </div>
    <!-- <div class="container-wrp">
        <el-form class="form-encrypt" ref="form" :model="form" label-position="top" label-width="80px">
         <el-row :gutter="20">
             <el-col :span="12">
                 <el-form-item label="明文">
                     <el-input v-model="form.plain" type="textarea" style=""></el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="密文">
                     <el-input v-model="form.ciphertxt" type="textarea" style=""></el-input>
                 </el-form-item>
             </el-col>
         </el-row>
         <el-row>
             <el-col :span="24">
                 <el-form-item label="密钥">
                     <el-input v-model="form.key"></el-input>
                 </el-form-item>
             </el-col>
         </el-row>
         <el-row>
             <el-col :span="24">
                 <el-form-item label="随机值">
                     <el-input v-model="form.nonce"></el-input>
                 </el-form-item>
             </el-col>
         </el-row>
         <el-row>
             <el-col :span="24">
                 <el-form-item label="附加认证信息">
                     <el-input v-model="form.aad"></el-input>
                 </el-form-item>
             </el-col>
         </el-row>
         
         <el-row :space="240">
            <el-button type="primary" @click="encrypt" icon="el-icon-lock">加密</el-button>
            <el-button type="primary" @click="decrypt" icon="el-icon-unlock">加密</el-button>
         </el-row>
         
        </el-form>
    </div> -->
</template>


<script>
import request from "@/request/index";

export default {


    props() {
      return {
        options2: [
            {
                value: '选项1',
                label: '黄金糕'
            },
            {
                value: '选项2',
                label: '双皮奶',
                disabled: true
            },
            {
                value: '选项3',
                label: '蚵仔煎'
            },
            {
                value: '选项4',
                label: '龙须面'
            },
            {
                value: '选项5',
                label: '北京烤鸭'
            }
        ],
        value2: ''
      }
    },

    methods: {
        encrypt() {
            console.log("encrypt==", this.form);
            const {ciphertxt, ...data} = this.form;
            request({
                url: '/encryptbyaes128gcm',
                method: 'POST',
                data,
            }).then((res) => {
                this.form.ciphertxt = res;
                console.log("res==", res);
            })
        }
    }
}
</script>
<style>
.container-wrp {
    width: 100%;
    display: flex;
    justify-content: center;
}
.container-wrp .form-encrypt {
    width: 60%;
}
.form-encrypt .el-select {
    width: 100%;
}
</style>